
<template>
  <div class="box">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="企业信息" name="1">
        <com-list :status="activeName == 1"></com-list>
      </el-tab-pane>
      <el-tab-pane label="商品信息" name="2">
        <goods-list :status="activeName == 2"></goods-list>
      </el-tab-pane>
      <el-tab-pane label="服务单信息" name="3">
        <serve-list :status="activeName == 3"></serve-list>
      </el-tab-pane>
  </el-tabs>
  </div>
</template>

<script>
import {checkStatus, comInfo, goodsInfo, serveInfo} from '../../../data/recheck.js'
import comList from './controls/comList'
import serveList from './controls/serveList'
import goodsList from './controls/goodsList'
export default {
  name: 'infoRecheck',
  components: {
    comList,
    goodsList,
    serveList
  },
  data(){
    return {
      activeName: this.$route.query.activeName || '1'
    }
  },
  methods: {
      handleClick(tab, event) {
        console.log(tab, event);
        console.log(this.activeName == 2)
      },
      handleClick2(tab, event) {
        this.$router.push('comInfo')
        console.log(tab, event);
      },
      handleClick3(tab, event) {
        let status = tab.phone === '下架' ? '1' : '0' 
        this.$router.push('goodsInfo?status=' + status)
        console.log(tab, event);
      },
      handleClick4(tab, event) {
        let status = tab.phone === '删除' ? '1' : '0' 
        this.$router.push('serveInfo?status=' + status)
        console.log(tab, event);
      },
      handleSizeChange(val) {
          console.log(`每页 ${val} 条`);
        },
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
      }
    }
}
</script>

<style lang="less" scoped>
  .box{
    padding-left: 10px;
  }
  .container{
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
  }
  .com-input {
    width: 210px;
    margin-right: 20px
  }
  .btn{
    margin-left: 20px;
  }
</style>
